load("@fbsource//tools/build_defs:rust_library.bzl", "rust_library")
load("@fbsource//tools/build_defs:rust_unittest.bzl", "rust_unittest")

oncall("scm_server_infra")

rust_library(
    name = "packfile",
    srcs = glob(["src/**/*.rs"]),
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:futures",
        "fbsource//third-party/rust:gix-hash",
        "fbsource//third-party/rust:gix-pack",
        "fbsource//third-party/rust:pin-project",
        "fbsource//third-party/rust:rustc-hash",
        "fbsource//third-party/rust:sha1",
        "fbsource//third-party/rust:sha1-checked",
        "fbsource//third-party/rust:thiserror",
        "fbsource//third-party/rust:tokio",
        "//eden/mononoke/git/git_types:git_types",
    ],
)

rust_unittest(
    name = "packfile_test",
    srcs = glob(["test/**/*.rs"]),
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:bytes",
        "fbsource//third-party/rust:flate2",
        "fbsource//third-party/rust:futures",
        "fbsource//third-party/rust:gix-features",
        "fbsource//third-party/rust:gix-hash",
        "fbsource//third-party/rust:gix-object",
        "fbsource//third-party/rust:gix-pack",
        "fbsource//third-party/rust:quickcheck",
        "fbsource//third-party/rust:tempfile",
        ":packfile",
        "//common/rust/shed/fbinit:fbinit",
        "//common/rust/shed/fbinit:fbinit-tokio",
        "//eden/mononoke/git/git_types:git_types",
        "//eden/mononoke/mononoke_macros:mononoke_macros",
        "//eden/mononoke/third_party/git_delta:git_delta",
    ],
)
